<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数据类型检测</title>
</head>

<body>
  <script>
    let num = 10;//number
    console.log(typeof num);
    let str = "Hello World";// string
    console.log(typeof str);
    let bool = true;//boolean
    console.log(typeof bool);
    let flag = false;//boolean
    console.log(typeof flag);
    let un //undefined
    console.log(typeof un);
    let obj = null;//object
    console.log(typeof obj);
  </script>
</body>

</html>